package com.healthcare.client.mapper;

import com.healthcare.client.pojo.Referral;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.healthcare.client.vo.AdminConsultationlListVo;
import com.healthcare.client.vo.DoctorConsultationlListVo;
import com.healthcare.client.vo.DoctorMonadVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 转诊申请 Mapper 接口
 * </p>
 *
 * @author 新华医院转诊联盟
 * @since 2020-04-13
 */
public interface ReferralMapper extends BaseMapper<Referral> {
    /**
     * 查询今天的待转诊条数
     * @param doctorId 医生id
     * @return
     */
    List<Referral> getReferralTodayList(@Param("doctorId") int doctorId);

    /**
     *  查询属于当前医生的转诊列表 id--如果id为空则查询
     * @param doctorId 医生id
     * @return
     */
    List<AdminConsultationlListVo> getReferralListVo(@Param("doctorId") int doctorId, @Param("sortType")Integer sortType, @Param("patientname")String patientname);

    /**
     *  根据转诊单id,得到转诊单得所有信息
     * @param referralId 转诊单id
     * @return
     */
    List<DoctorMonadVo> getDoctorMonadVoList(@Param("referralId") Integer referralId);
}
